﻿using HttpApiGateway.Interface;
using RpcClient.Interface;

namespace HttpApiGateway
{
    internal class HttpGatewayService : IExtendService
    {
        private IIdempotentService _Idempotent;
        public HttpGatewayService(IIdempotentService idempotent)
        {
            _Idempotent = idempotent;
        }

        public string Name => "HttpGatewayService";

        public void Load(IRpcService service)
        {
            service.StartUpComplate += Service_StartUpComplate;
        }

        private void Service_StartUpComplate()
        {
            _Idempotent.Init();
        }
    }
}
